﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService" in both code and config file together.
[ServiceContract]
public interface IService
{
    [OperationContract]
    ItemInfo[] ReadItems(int parent);

    [OperationContract]
    ItemInfo ReadItem(int id);

    [OperationContract]
    NewsInfo ReadNews(int id);

    [OperationContract]
    NewsInfo[] ReadNewses(int parent);

    [OperationContract]
    ProductInfo ReadProduct(int id);

    [OperationContract]
    ProductInfo[] ReadProducts(int parent);

    [OperationContract]
    ProductInfo[] ReadProductCategories(int parent);

    [OperationContract]
    List<string[]> GetProductPath(int id);
    
    [OperationContract]
    FileInfor ReadFile(int id);

    [OperationContract]
    FileInfor[] ReadFiles(int parent);

    [OperationContract]
    IndexInfo ReadIndex(int title);

    [OperationContract]
    bool Login(string name, string pwd);

    [OperationContract]
    CommInfo[] ReadCommonBySort(string sort);


}
